import request from './request/index';
import interfaceApi from './interfaceApi';
import type {
  HomeDataReq,
  HomeDataRes,
  DetailReq,
  DetailRes,
  HistroyReq,
  HistroyRes,
  HistroyDetailReq,
  HistroyDetailRes
} from '@/types/api.ts';
const reqHomeData = (param: HomeDataReq): Promise<HomeDataRes['data']> =>
  request.post(interfaceApi.homeData, param, {});
const reqDetail = (param: DetailReq): Promise<DetailRes['data']> =>
  request.post(interfaceApi.detail, param, {});
const reqHistory = (param: HistroyReq): Promise<HistroyRes['data']> =>
  request.post(interfaceApi.histroy, param, {});
const reqHistroyDetail = (param: HistroyDetailReq): Promise<HistroyDetailRes['data']> =>
  request.post(interfaceApi.histroyDetail, param, {});
export { reqHomeData, reqDetail, reqHistory, reqHistroyDetail };
